/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.delivery.dao;

import com.mycompany.delivery.entities.Courier;
import java.util.List;

/**
 *
 * @author Martin Huněk
 */
public interface CourierDAO {
    
    
    /**
     * Add new courier to database
     * @param courier
     */
   public void createCourier(Courier courier);

    /**
     * Update old courier to new one in database
     * @param courier
     */
    public void updateCourier(Courier courier);

    /**
     * Delete courier from database
     * @param courier
     */
    public void deleteCourier(Courier courier);

    /**
     * Return courier by its ID
     * @param id
     * @return Courier
     */
    public Courier getCourierById(Long id);

    /**
     * Return Courier by its login
     * @param login
     * @return Courier
     */
    public Courier getCourierByLogin(String login);

    /**
     * Return all courier
     * @return List<Courier>
     */   
   public List<Courier> getAllCouriers();
   
   /**
    * Check if login is unique (any other employee or courier dont have same login)
    * @param login 
    * @return return true if login is unique
    */
   public boolean isLoginUnique(String login);
    
}
